<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.box{
				width: 200px;
				height: 200px;
				background: pink;
				/* margin-top: 2000px; */
			}
		</style>
	</head>
	<body>
		<div class="box"></div>
		<input type="text"  id="txt" />
		<script>
			var box=document.querySelector('.box');
			box.addEventListener('click',function(event){
				//console.log(event); //w3c
				//window.event  非标准
				var e=event||window.event;
				console.log(e);
				console.log(e.clientX,e.clientY); //可视区域的宽和高
				console.log(e.pageX,e.pageY);   //
				console.log(e.target);
			
			})
			
		txt.addEventListener('keypress',function(e){
			console.log(e.keyCode,e.key);
		})	
			
			
			
		</script>
	</body>
</html>
